package com.jinsi.controller;

import com.jinsi.service.ScTuitionApiServer;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;


@RequestMapping("/scTuitionApi")
@RestController
public class ScTuitionApiController {

    @Autowired
    private ScTuitionApiServer scTuitionApiServer;


    //传入期数获取当前年限的所有可用收费标准
    @GetMapping("/getAllThisYearStandard")
    Map<String, Object> getAllThisYearStandard(int classesPeriods){
        return scTuitionApiServer.getAllThisYearStandard(classesPeriods);
    }

    //获取所有启用未过期的收费标准
    @GetMapping("/getAllStandardUseing")
    Map<String, Object> getAllStandardUseing(){
        return scTuitionApiServer.getAllStandardUseing();
    }

    //根据学生id查询市场部
    @GetMapping("/getMarketingName")
    Map<String,Object> getMarketingName(String sid){
    return scTuitionApiServer.getMarketingName(sid);
    }

    /**
     * 获取全部市场部信息
     */
    @RequestMapping("/getMarketingList")
    Map<String, Object> getMarketingList(){
        return scTuitionApiServer.getMarketingList();
    }
}
